package com.lcb.jmm.thread;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/****
 * @Author:刘长柏
 * @Date: 2021-01-07 10:16
 * @Description:测试有返回值线程类
 *****/
public class ThreadTest {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        FutureTask ft = new FutureTask(new CallTask());
        Thread thread = new Thread(ft);
        thread.start();

        System.out.println(ft.get());
    }
}
